package 第八周.homework;

//将所储存的DVD按名字排序。
public class Movies1{
    //Creates a DVDCollection object and adds some DVDs to it,Prints
    //reports on the status of the collection.
public static void main(String []args)
        {
        DVD1[] movies = new DVD1[7];

        movies[0]=new DVD1("The Godfather","Francis Ford Coppola",1972,24.92,true);
        movies[1]=new DVD1("District 9","Neill Blomkamp",2009,19.95,false);
        movies[2]=new DVD1("Iron","Jon Favreau",2008,15.95,false);
        movies[3]=new DVD1("All About Eve","Joseph Mankiewicz",1950,17.50,false);
        movies[4]=new DVD1("The Matrix","Andy & Lana Wachowski",1999,19.95,true);
        movies[5]=new DVD1("Iron Man 2","Jon Favreau",2010,22.99,false);
        movies[6]=new DVD1("Casablanca","Michael Curtiz",1942,19.92,false);

        System.out.println("递减排列");
        Sorting1.selectionSort(movies);
        for(DVD1 movie:movies)
            System.out.println(movie);
        System.out.println("------------------------");
        Sorting1.insertionSort(movies);
        for(DVD1 movie:movies)
                System.out.println(movie);
        }
        }